﻿<Window x:Class="MarvinsArena.WindowEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Editor" Height="480" Width="640" WindowStartupLocation="CenterScreen">
    
    <Grid Width="Auto" Height="Auto">
        <Grid.Resources>
            <Image x:Key="MenuIconNew" Source="ToolBarIcons/new2.png" Width="16" Height="16" ToolTip="New" SnapsToDevicePixels="True" />
            <Image x:Key="MenuIconOpen" Source="ToolBarIcons/open.png" Width="16" Height="16" ToolTip="Open" SnapsToDevicePixels="True" />
            <Image x:Key="MenuIconSave" Source="ToolBarIcons/save.png" Width="16" Height="16" ToolTip="Save" SnapsToDevicePixels="True"/>

            <Image x:Key="ButtonIconNew" Source="ToolBarIcons/new2.png" Width="16" Height="16" ToolTip="New" SnapsToDevicePixels="True" />
            <Image x:Key="ButtonIconOpen" Source="ToolBarIcons/open.png" Width="16" Height="16" ToolTip="Open" SnapsToDevicePixels="True" />
            <Image x:Key="ButtonIconSave" Source="ToolBarIcons/save.png" Width="16" Height="16" ToolTip="Save" SnapsToDevicePixels="True"/>
        </Grid.Resources>
        <Grid.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="Gray" Offset="0" />
                <GradientStop Color="Black" Offset="1" />
            </LinearGradientBrush>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Menu Grid.Row="0" Width="Auto" Height="24" DockPanel.Dock="Top">
            <!-- File Menu -->
            <MenuItem Header="File">
                <MenuItem Header="New" Icon="{StaticResource MenuIconNew}" Click="MenuItemNew_Click" />
                <MenuItem Header="Open" Icon="{StaticResource MenuIconOpen}" Click="MenuItemOpen_Click" />
                <Separator/>
                <MenuItem Header="Save" Icon="{StaticResource MenuIconSave}" Click="MenuItemSave_Click" Name="MenuItemSave" />
                <MenuItem Header="Save As..." Click="MenuItemSaveAs_Click" Name="MenuItemSaveAs" />
                <Separator/>
                <MenuItem Header="Exit" Click="MenuItemExit_Click" />
            </MenuItem>
        </Menu>

        <ToolBarTray Grid.Row="1" Background="#FF333333" SnapsToDevicePixels="True">
            <ToolBar Band="1" BandIndex="1" SnapsToDevicePixels="True">
                <Button Click="MenuItemNew_Click" Content="{StaticResource ButtonIconNew}" />
                <Button Click="MenuItemOpen_Click" Content="{StaticResource ButtonIconOpen}" />
                <Button Click="MenuItemSave_Click" Content="{StaticResource ButtonIconSave}" Name="ToolBarSave" />
            </ToolBar>
        </ToolBarTray>

        <ScrollViewer Grid.Row="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <Canvas Name="Canvas1" DockPanel.Dock="Left" Margin="0, 0, 0, 0" SnapsToDevicePixels="True" />
        </ScrollViewer>
    </Grid>
</Window>
